package com.qf.springcloud.client;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.qf.springcloud.fallback.AirSearchClientFallback;
import com.qf.springcloud.fallback.AirSearchClientFallbackFactory;
import feign.RequestLine;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

/**
 * @author zjw
 * @description 与Air-Search服务的Controller进行映射
 * @date 2021/11/10$ 14:18$
 */
@FeignClient(value = "search",fallbackFactory = AirSearchClientFallbackFactory.class)     // http://localhost:8080
public interface AirSearchClient {

    /**
     * /path   parameter  result;
     * @return
     */
    @GetMapping("/air/search")
    String search();


    @GetMapping("/air/delete/{id}")
    public String delete(@PathVariable String id);


    @PostMapping("/air/update")
    public void update(@RequestParam String id, @RequestParam String name, @RequestParam Integer age, @RequestParam Date birthday);


    @PostMapping("/air/add")
    public Map add(@RequestBody Map map);











}
